package com.ecp.commons.serialization;

import com.mongodb.BasicDBObject;

public abstract class MongoBean extends BasicDBObject {
	private static final long	serialVersionUID	= 1L;

	// 需要继承
	public abstract String getCollectionName();

	public long getId() {
		return this.getLong("_id", 0);
	}

	public void setId(long id) {
		this.put("_id", id);
	}
}
